//
//  NewsViewController.m
//  Corner
//
//  Created by lanou3g on 15/11/18.
//  Copyright © 2015年 Zero_Zhou. All rights reserved.
//

#import "NewsViewController.h"

#import "AppDelegate.h"

@interface NewsViewController ()

@end

@implementation NewsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor redColor];
  self.title = @"资讯";
    self.tabBarController.tabBar.backgroundColor = [UIColor colorWithRed:1.000 green:0.241 blue:0.308 alpha:1.000];
    UIButton *menuBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    menuBtn.frame = CGRectMake(0, 0, 20, 18);
    [menuBtn setBackgroundImage:[UIImage imageNamed:@"menu"] forState:UIControlStateNormal];
    [menuBtn addTarget:self action:@selector(openOrCloseLeftList) forControlEvents:UIControlEventTouchUpInside];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:menuBtn];

    // Do any additional setup after loading the view.
}

- (void) openOrCloseLeftList
{
    AppDelegate *tempAppDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
    
    if (tempAppDelegate.LeftSlideVc.closed)
    {
        [tempAppDelegate.LeftSlideVc openLeftView];
    }
    else
    {
        [tempAppDelegate.LeftSlideVc closeLeftView];
    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
